/*
Jimmy Manone
Lab09-T01
10/23/14
*/

#include	<stdint.h>
#include	<stdbool.h>
#include	<math.h> //the code uses the sinf() function prototyped by this header file
#include	"inc/hw_memmap.h"
#include	"inc/hw_types.h"
#include	"driverlib/fpu.h"//support for Floating Point Unit
#include	"driverlib/sysctl.h"
#include	"driverlib/rom.h"
#ifndef	M_PI
#define	M_PI	3.14159265358979323846
#endif
#define	SERIES_LENGTH	100 //this is the depth of our data buffer
float	gSeriesData[SERIES_LENGTH]; //an array of floats SERIES_LENGTH long
int32_t	i32DataCount=0; //a counter for our computation loop
int	main(void)
{
  float	fRadians; //calculate sine/cos
  FPULazyStackingEnable(); //Turn on lazy stacking
  FPUEnable(); //Turn on floating point unit
  SysCtlClockSet(SYSCTL_SYSDIV_4|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN); //50MHz
  fRadians =((2*M_PI)/SERIES_LENGTH);
  while(i32DataCount	<	SERIES_LENGTH)
  {
    gSeriesData[i32DataCount]	=	sinf(fRadians	*	i32DataCount);
    i32DataCount++;
  }
  while(1)
  {
  }
}
